package com.wzy.alllearning.exception;

import lombok.Getter;

public class BusinessException extends RuntimeException
{
	@Getter
	private final int code;

	public BusinessException(ErrorCodeEnum errorCodeEnum)
	{
		super();
		this.code = errorCodeEnum.getCode();
	}

	public BusinessException(ErrorCodeEnum errorCodeEnum, String message)
	{
		super(message);
		this.code = errorCodeEnum.getCode();
	}

	public BusinessException(ErrorCodeEnum errorCodeEnum, Throwable cause)
	{
		super(cause);
		this.code = errorCodeEnum.getCode();
	}
}
